home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Supervisor's Toolkit
/
Network Supervisor's Toolkit.iso
/
tools
/
lu62
/
debug
/
getdcwd.asm
< prev
next >
Wrap
Assembly Source File
|
1996-07-10
|
2KB
|
60 lines
;**********************************************************
;* *
;* Get_DireCtory_With_Drive *
;* *
;* Input: DS:SI points to buffer *
;* Output: In AX length of full path name *
;* *
;* Last modification: 93-02-01 15:15. *
;* *
;* *
;* CopyRight 1995. Nicholas Poljakov all rights reserved.*
;* *
;**********************************************************
.DOSSEG
.MODEL SMALL
include c:\m61\include\dos.inc
include c:\m61\include\bios.inc
include c:\m61\include\macros.inc
PUBLIC GetDcWD
.CODE
GetDcWD PROC
@SaveRegs ds,si,es,bx,di,cx,dx,ax,bp
mov bp, sp
@GetDrv
mov dl, al ; save current drive number
add al, 41h
mov BYTE PTR [si], al
inc si
mov BYTE PTR [si], ':'
inc si
mov BYTE PTR [si], '\'
inc si
inc dl
mov ah, 47h ; get current path
int 21h ; in buffer points DS:SI
dec si
dec si
dec si
mov dx, si ; save initial value of pointer
Sk0:
lodsb
and al, al
jnz Sk0
sub si, dx ; length of var. current_directory_name + 1
dec si
mov WORD PTR [bp + 2], si ; set return value of AX
@RestoreRegs
ret
GetDcWD ENDP
END